<template>
  <div>
    <!-- 全屏 -->
    <i
      :class="icon ? 'iconfont icon-quxiaoquanping' : 'iconfont icon-quanping'"
      @click="FullScreen"
    ></i>
  </div>
</template>

<script>
import screenfull from "screenfull";
export default {
  data() {
    return {
      icon: "", //全屏的图标
      color: "", //颜色
    };
  },
  methods: {
    //全屏
    FullScreen() {
      screenfull.toggle();
      this.icon = !this.icon; //更改图标
    },
  },
};
</script>
<style scoped lang="less">
i {
  font-size: 30px;
}
</style>
